package com.atguigu.gmall.publisher.mapper;

import com.atguigu.gmall.publisher.bean.TrademarkCommodityStats;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CommodityStatsMapper {
    @Select("select \n" +
            "     cast(sum(total_amount) as double) total_amount,\n" +
            "     sum(order_user_count) order_user_count,\n" +
            "     sum(order_count) order_count\n" +
            "from dws_trade_order_window\n" +
            "where toYYYYMMDD(stt) = #{date};")
    List<TrademarkCommodityStats> selectTrademarkStats(@Param("date") Integer date);
}

